﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AzureToolkit.Engine
{
    internal abstract class JobScheduleBase 
    {
        protected DateTime nextRunTime;
        protected DateTime lastRunTime;
        protected Type type;

        public Type Type {
            get { return this.type; }
        }

        public DateTime NextRunTime {
            get { return this.nextRunTime; }
        }
        
        public DateTime LastRunTime {
            get { return this.lastRunTime; }
        }

        public bool ShouldRun(DateTime currentTime) {
            return this.NextRunTime < currentTime && this.LastRunTime != this.NextRunTime;
        }

        public abstract void Increment();
    }
}
